import log from "./log/log";
import activityRoute from "./activity/index";
import type { RouteRecordRaw } from "vue-router";
import dictionaryRoute from "./dictionary/dictionary";
import carShopRoutes from "./carShop/carShop";

const routes: RouteRecordRaw[] = [
  {
    path: "/",
    name: "layout",
    component: () => import("@/views/layout.vue"),
    meta: {
      title: "家悦行·家庭汽车幸福启航",
    },
    children: [
      {
        path: "",
        name: "home",
        component: () => import("@/views/Home/Home3.vue"),
        meta: {
          title: "首页",
        },
      },
      dictionaryRoute,
      log,
      activityRoute,
      carShopRoutes,
    ],
  },
  {
    path: "/login",
    component: () => import("@/views/Login/Login.vue"),
    name: "login",
    meta: {
      title: "登录",
      not_check: true,
    },
  },
  {
    path: "/:pathMatch(.*)*",
    redirect: "/",
  },
];

export default routes;
